#include "IAbility.h"
#include "GlobalTimer.h"

namespace Combat
{
	IAbility::IAbility( Combatant* combatComponent ) : m_owner(combatComponent)
	{
	}
	void IAbility::setCooldownTime()
	{
		m_cooldownTimer = GlobalTimer::getTime();
	}
	bool IAbility::isOffCooldown()
	{
		return (GlobalTimer::getTime().getSecondsSinceStart() > m_cooldownTimer.getSecondsSinceStart() + m_cooldown);
	}
	Combatant*& IAbility::Owner()
	{
		return m_owner;
	}
}